home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13752 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: noc.netcom.net!news
  2. From: Tarang Deshpande <tarang@willows.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Static vs Dynamic linking
  5. Date: Tue, 09 Apr 1996 14:59:19 -0700
  6. Organization: NETCOM Network Operations
  7. Message-ID: <316ADDB7.731@willows.com>
  8. References: <4kefrj$smn@nntp.ucs.ubc.ca>
  9. NNTP-Posting-Host: daffy.willows.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0GoldB2 (Win95; I)
  14.  
  15. Daniel l Aldham wrote:
  16. > Could someone explain , or  point out a good reference to , what
  17. > is the difference and/or advantages of static versus dynamic linking.
  18. > Thanks
  19. > Danny Aldham
  20.  
  21.  
  22. Static linking occures at compile time whereas dynamic linking occurs
  23. at run-time.  Because of this a program that uses dynamic linking will
  24. run slighly slower than the same program linked staticly because the
  25. linker is figuring out what address to jump to when a call is made
  26. as opposed to having figured that out when compiling as in static
  27. linking.  The advantage of dynamic linking is it allows more than
  28. one program at a time to share the DLL whereas if the programs were
  29. staticly linked then each program would have its own copy.  Another
  30. advantage of dynamic linking is it allows you to change something 
  31. in the DLL without having to recompile the program(s) as long as
  32. there is no interface change.  As an offshoot to this if you need
  33. to distribute your software then updating users with one DLL is easier
  34. than updating users with multiple programs.
  35.  
  36. Hope that helps.
  37.  
  38. Tarang
  39.